FROM centos:latest
MAINTAINER mike "mike_hmr@126.com"
ADD jdk-8u121-linux-x64.tar.gz /usr/local/jdk/
ENV JAVA_HOME /usr/local/jdk/jdk1.8.0_121
ENV CLASSPATH $JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH $PATH:$JAVA_HOME/bin
RUN echo "export JAVA_HOME=/usr/local/jdk/jdk1.8.0_121" >> /etc/profile
RUN echo "export CLASSPATH=.:\$JAVA_HOME/jre/lib/rt.jar:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar" >> /etc/profile
RUN echo "export PATH=\$PATH:\$JAVA_HOME/bin" >> /etc/profile
RUN source /etc/profile
